// const { resolve } = require("core-js/fn/promise");
const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}

const porjectName = 'vant系统管理后台';

module.exports = {
    // 配置参考
    // https://segmentfault.com/a/1190000039772292
    outputDir: 'dist', //打包文件输出路径，即打包到哪里
    assetsDir: 'static',  // 静态资源地址
    lintOnSave:false, // eslint-loader 是否在保存的时候检查
    productionSourceMap: false, // 生产环境是否生成 sourceMap 文件
    filenameHashing: true, //文件hash
    // chainWebpack: config => {
    //     config.resolve.alias
    //         // 自定义key,value，如.set('@assets', resolve('src/assets'))
    //         .set('@', resolve('src'))
    // },
    configureWebpack: {
        // provide the app's title in webpack's name field, so that
        // it can be accessed in index.html to inject the correct title.
        name: porjectName,
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },
}